<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>设置中心</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="__CDN__/assets/vvptd/setting/css/mui.min.css" rel="stylesheet" />
		<link href="__CDN__/assets/vvptd/setting/css/style.css" rel="stylesheet" />
		<script src="__CDN__/assets/vvptd/setting/js/mui.min.js"></script>
        <link href="__CDN__/assets/vvptd/setting/css/iconfont.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="__CDN__/assets/vvptd/layer/need/layer.css"/>
        <script src="__CDN__/assets/vvptd/layer/layer.js"></script>
		<style type="text/css">
			body{
				background-color: #FAFAFA;
			}
            /* 解约弹窗 */
            .mui-popup-inner,.mui-popup-button:first-child{
                background: #fff;
            }
            .mui-popup-button{
                color: #333;
            }
            .mui-popup-button:first-child{
                color: #858585;
            }
            .mui-popup-button.mui-popup-button-bold{
                font-weight: normal;
            }
            .mui-popup-input input{
                height: 36px;
            }
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
		    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
		    <h1 class="mui-title">设置中心</h1>
		</header>
		
		<div class="mui-content setting-main">
			<ul class="mui-table-view">
				<li class="mui-table-view-cell">
					<a class="mui-navigate-right" href="/vvptd/setting/update_password">
						修改登录密码
					</a>
				</li>
			</ul>
			<div class="hui-bg"></div>
			<ul class="mui-table-view">
				<!--<li class="mui-table-view-cell">-->
					<!--离线地图-->
					<!--<span class="upload">开始下载</span>-->
				<!--</li>-->
				<li class="mui-table-view-cell">
					<a class="mui-navigate-right" href="/vvptd/setting/setReflect">
						提现账户
					</a>
				</li>
				<li class="mui-table-view-cell">
					<a class="mui-navigate-right" href="/vvptd/setting/setMapType">
						导航方式
					</a>
				</li>
				<li class="mui-table-view-cell">
					<a class="mui-navigate-right" href="/vvptd/setting/setReceipt">
						接单设置
					</a>
				</li>
				<li id="jieyue" class="mui-table-view-cell" >
					<a class="mui-navigate-right">
						申请解约
					</a>
				</li>
			</ul>
			<div class="hui-bg"></div>
			<ul class="mui-table-view">
				<li id="qingchu" class="mui-table-view-cell">
					<a class="mui-navigate-right">
						清除缓存
					</a>
				</li>
				<li class="mui-table-view-cell">
					<a class="mui-navigate-right" href="/vvptd/setting/aboutWe">
						关于我们
					</a>
				</li>
			</ul>
		</div>
	</body>
    <script src="__CDN__/assets/vvptd/setting/js/jquery.min.js"></script>
    <script type="text/javascript">
        mui.init();
        var html = '<i class="iconfont icon-gantanhao" style="color:#FF7751;font-size:18px;margin-right:5px;"></i>';
        document.getElementById("qingchu").addEventListener('tap', function(e) {
            layer.open({
                content:'清除成功'
                , skin: 'msg'
                , time: 2 //2秒后自动关闭

            });
        })
        // 申请解约
        document.getElementById("jieyue").addEventListener('tap', function(e) {
            e.detail.gesture.preventDefault(); //修复iOS 8.x平台存在的bug，使用plus.nativeUI.prompt会造成输入法闪一下又没了
            var btnArray = ['确定', '取消'];
            mui.prompt(' ', '请输入登录密码', '申请解约', btnArray, function(e) {
                if (e.index == 0) {
                    // info.innerText = '谢谢你的评语：' + e.value;
                    mui.ajax('/vvptd/setting/dissolution',{
                        type:'post',
                        data:{
                            password:e.value
                        },
                        success: function (data) {
                            if(data.code == 1){
                                layer.open({
                                    content:data.msg
                                    , skin: 'msg'
                                    , time: 2 //2秒后自动关闭

                                });

                            }else{
                                layer.open({
                                    content:'请输入密码'
                                    , skin: 'msg'
                                    , time: 2 //2秒后自动关闭

                                });
                            }
                        },
                        error: function (data) {
                            layer.open({
                                content:'网络繁忙'
                                , skin: 'msg'
                                , time: 2 //2秒后自动关闭

                            });
                        }
                    })
                } else {
                    // info.innerText = '你点了取消按钮';
                }
            })
        });

    </script>
</html>